<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
	<link rel="stylesheet" type="text/css" href="uploadify/uploadify.css">
	<script type='text/javascript' src='uploadify/jquery.uploadify.v2.1.4.js'></script>
	<script type='text/javascript' src='uploadify/swfobject.js'></script>
	<script type="text/javascript">	
	
		$(document).ready(function(){ 
			
			$('.botaoSalvar').click(function(){
			
				$('#fotos').uploadifyUpload(); 	
			});
			
			
        	$("#fotos").uploadify({
        		uploader : "uploadify/uploadify.swf",
        		script   : "uploadify/uploadify.php",
        		cancelImg: "uploadify/cancel.png",
        		script: "uploadify/uploadify.php",
        		buttonText : "Localizar arquivo!",
        		folder: 'uploads/',
        		queueID  : "itens",
        		auto:false,
        		onComplete : function(event,ID,fileObj,response,data){ 
        						
        					},		
        		onAllComplete : function(event,data){
        			
        			$('form').submit();
        			
        		}  
        		
        	});
			
		
			$(".data").mask("99/99/9999");
			//Lembrar de colocar disponibilidade de usar menos campos
			$(".num").mask("999");
			$(".cep").mask("99.999-999");
			$(".tel").mask("(99)9999-9999");
			$(".cnpj").mask("99.999.999/9999-99");
			$(".cpf").mask("999.999.999-99");
			// Configuração para campos de Real.
			$(".dinheiro").maskMoney({showSymbol:true, symbol:"R$", decimal:",", thousands:"."});
			 
		});	
	</script>

</head>
<body>
	<form name="form" id="form" action="<?php echo $info['acao']; ?>" method="post" enctype="multipart/form-data">
		<div class="center_prod_box_big">            
                 
			<div class="contact_form">
				<fieldset>
					<legend>Cadastro de Produtos</legend>    
					
					<div class="form_row">
						<label class="contact"><strong>Nome:</strong></label>
						<input type="text" class="contact_input" name="nome" id="nome"/>
					</div>  

					<div class="form_row">
						<label class="contact"><strong>Descrição:</strong></label>
						<input type="text" class="contact_input" name="descricao" id="descricao"/>
					</div>
                    
                    <div class="form_row">
						<label class="contact"><strong>Fabricante:</strong></label>
						<input type="text" class="contact_input" name="fabricante" id="fabricante"/>
					</div>
                    
                    <div class="form_row">
						<label class="contact"><strong>Quantidade em estoque:</strong></label>
						<input type="text" class="contact_input num" name="quantidade_estoque" id="quantidade_estoque"/>
					</div>
                    
                    <div class="form_row">
						<label class="contact"><strong>Preço de custo:</strong></label>
						<input type="text" class="contact_input dinheiro" name="preco_custo" id="preco_custo"/>
					</div>
                    
                    <div class="form_row">
						<label class="contact"><strong>Preço de venda:</strong></label>
						<input type="text" class="contact_input dinheiro" name="preco_venda" id="preco_venda"/>
					</div>
                    
                    <div class="form_row">
						<label class="contact"><strong>Validade:</strong></label>
						<input type="text" class="contact_input data" name="validade" id="validade"/>
					</div>
                    
                    <div class="form_row" >
						<input type="file"  name="fotos" id="fotos" class="contact_input"/>
                        <div id="itens"></div>
					</div>
						
					
					<div class="form_row">
						<a href="#" id='' target='' class="prod_details botaoSalvar" >Salvar</a>
						<input type="hidden" id="acao" name="acao" value='' />
					</div>      
				</fieldset>		
			</div>
        </div> 
     </form>        
</body>
</html>
